//
//  YTNewUserGift.m
//  yitaicaijing
//
//  Created by DIANGHONG on 2018/7/19.
//  Copyright © 2018年 DIANGHONG. All rights reserved.
//

#import "YTNewUserGift.h"
@interface YTNewUserGift ()

@end
@implementation YTNewUserGift

+ (instancetype)userGiftViewWithFrame:(CGRect)frame
{
    UINib *nib = [UINib nibWithNibName:@"YTNewUserGift" bundle:nil];
    YTNewUserGift *view = [nib instantiateWithOwner:nil options:nil][0];
    view.frame = frame;
    return view;
}

#pragma mark: - 待会去看按钮监听
- (IBAction)dismissButtonClick:(UIButton *)sender
{
    [UIView animateWithDuration:0.25 animations:^{
        self.alpha = 0;
    } completion:^(BOOL finished) {
        [self removeFromSuperview];
    }];
}

- (void)awakeFromNib
{
    [super awakeFromNib];
    
    self.backgroundColor = [[UIColor whiteColor] colorWithAlphaComponent:0];
}
@end
